function getStoorageItem(key, isFamily = false) {
  if (isFamily) {
    return wx.getStorageSync("familyInfo").member || wx.getStorageSync('volunteerInfo');
  }
  return wx.getStorageSync(key)
}

function setStorageItem(obj) {
  for (const key in obj) {
    if (Object.hasOwnProperty.call(obj, key)) {
      const element = obj[key];
      if (element !== getStoorageItem(key)) {
        wx.setStorageSync(key, element)
      }
    }
  }
}

wx.setStorageItem = setStorageItem;
wx.getStoorageItem = getStoorageItem;